enum Color {
    Red,
    Yellow,
    Blue,
}

enum BuildingLocation {
    Number(i32),
    Name(String),
    Unknown,
}

fn print_color(color: Color) {
    match color {
        Color::Red => println!("当前的颜色: red"),
        Color::Blue => println!("当前的颜色: blue"),
        Color::Yellow => println!("当前的颜色: yellow"),
        _ => {}
    }
}

impl BuildingLocation {
    fn print_location(& self) {
        match self {
            BuildingLocation::Number(number) => { println!("number为：{}", number) },
            BuildingLocation::Name(name) => { println!("name为：{}", name) },
            BuildingLocation::Unknown => { println!("unknown") }
        }
    }
}

pub fn menu_study_7() {
    // print_color(Color::Red);
    let house = BuildingLocation::Name("张三".to_string());
    house.print_location();
}
